Evaluate policies in Backbeat routes#5911
Conversation
Hello kerkesni,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 1 file with indirect coverage changes @@ Coverage Diff @@
## development/9.1 #5911 +/- ##
===================================================
+ Coverage 83.24% 83.52% +0.27%
===================================================
Files 190 190
Lines 12159 12167 +8
===================================================
+ Hits 10122 10162 +40
+ Misses 2037 2005 -32
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
ghost
left a comment
There was a problem hiding this comment.
Changes lgtm, just some more tests I believe we can add for completeness
| if (request.bypassUserBucketPolicies) { | ||
| return next(null, userInfo); | ||
| } |
There was a problem hiding this comment.
this "skip" on internal routes is already implemented deep inside bucket policies, inside isBucketAuthorized and isObjectAuthorized : is this redundant (i.e. we indeed call these later), or do we really need the extra skip here? In that case, should that check be added in handleAuthorizationResults ?
There was a problem hiding this comment.
The check is not redundant, as far as i understood we are only supposed to skip bucket policies when using an internal Cloudserver not all the policies, so handling the flag at a higher level like in handleAuthorizationResults would disable all policy evaluation including for standard APIs which is not something we want.
There was a problem hiding this comment.
handling the flag at a higher level like in handleAuthorizationResults would disable all policy evaluation including for standard APIs which is not something we want.
That explains why we want to keep the checks deep in isBucketAuthorized and isObjectAuthorized instead of moving it handleAuthorizationResults.
But should we not evaluate these "standard" policies on backbeat routes as well (i.e. remove this extra bypass, and just rely on the deeper bypass) ? Or is it something we can only do later, when we have added the required (custom) permissions in arsenal/vault and given them to the internal users?
There was a problem hiding this comment.
We could evaluate policies on the internal Cloudserver, however i'm not certain our internal services have the required permissions (policies) hence why i skipped the evaluation here.
I created a follow-up ticket to verify the policies we create for our services and eventually remove this check (ZENKO-5058)
Policy evaluation is skipped in the internal Cloudserver instance. Issue: CLDSRV-728
Issue: CLDSRV-728
ca67f3f to
4d7d1b3
Compare
|
/approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-728. Goodbye kerkesni. The following options are set: approve |
Evaluate policies in Backbeat routes when running in the external Cloudserver.
This PR is based on the implementation in #5714
Issue: CLDSRV-728